#ifndef _DECODER_IMP_
#define _DECODER_IMP_
#include "Decoder.h"
#include <map>

class DecoderImp : public Decoder
{
public:
	DecoderImp(void);
	~DecoderImp(void);
	
	virtual bool ReadDictionary(FileReader* reader);
	virtual void SetCodeCount(int count) {_codeSum = count;}
	virtual void SetCodeBlock(BYTE* codeBlock, int count);
	virtual bool GetNextData(DictData* dd);

private:
	std::map<DataCode, DictData> _dictionary;
	int _codeSum;
	int _decodeCount;
	BYTE* _codeBuffer;
	int _bufferSize;
	int _curByte;
	int _curBit;
	DataCode _code;
};

#endif